package com.ruoyi.module.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.module.mapper.FootprintMapper;
import com.ruoyi.module.domain.Footprint;
import com.ruoyi.module.service.IFootprintService;

/**
 * 足迹Service业务层处理
 *
 * @author fubojin
 * @date 2024-12-20
 */
@Service
public class FootprintServiceImpl implements IFootprintService
{
    @Autowired
    private FootprintMapper footprintMapper;

    /**
     * 查询足迹
     *
     * @param id 足迹主键
     * @return 足迹
     */
    @Override
    public Footprint selectFootprintById(Long id)
    {
        return footprintMapper.selectFootprintById(id);
    }

    /**
     * 查询足迹列表
     *
     * @param footprint 足迹
     * @return 足迹
     */
    @Override
    public List<Footprint> selectFootprintList(Footprint footprint)
    {
        return footprintMapper.selectFootprintList(footprint);
    }

    /**
     * 新增足迹
     *
     * @param footprint 足迹
     * @return 结果
     */
    @Override
    public int insertFootprint(Footprint footprint)
    {
        footprint.setCreateTime(DateUtils.getNowDate());
        return footprintMapper.insertFootprint(footprint);
    }

    /**
     * 修改足迹
     *
     * @param footprint 足迹
     * @return 结果
     */
    @Override
    public int updateFootprint(Footprint footprint)
    {
        return footprintMapper.updateFootprint(footprint);
    }

    /**
     * 批量删除足迹
     *
     * @param ids 需要删除的足迹主键
     * @return 结果
     */
    @Override
    public int deleteFootprintByIds(Long[] ids)
    {
        return footprintMapper.deleteFootprintByIds(ids);
    }

    /**
     * 删除足迹信息
     *
     * @param id 足迹主键
     * @return 结果
     */
    @Override
    public int deleteFootprintById(Long id)
    {
        return footprintMapper.deleteFootprintById(id);
    }
}
